﻿<div id="dlgEdit${ClassName}">
    @using (Ajax.BeginForm("Edit${ClassName}Do", "${ClassName}", null, new AjaxOptions { HttpMethod = "POST", OnFailure = "alert('error')", OnSuccess = "callBackEditFd(data);" }, new { @class = "form-horizontal", id = "Edit${ClassName}Form" }))
    {
        @Html.Hidden("id")
        <div class="row">
            <div class="col-md-12">
                <div class="form-group">
                    <label class="col-md-3 control-label">序列号</label>
                    <div class="col-md-6">
                        @Html.TextBox("imei",null, new { @class = "form-control", @readonly = "readonly" })
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">备注</label>
                    <div class="col-md-6">  
                        @Html.TextBox("comment", null, new { @class = "form-control ", placeholder = "请填写备注" })
                    </div>
                </div>
            </div>
        </div>
    }
</div>
<script type="text/javascript">

    function callBackEditFd(data) {
        if (data.Flag) {
            edit${TableName}Box.modal('hide');
            $(${TableName}_grid).trigger("reloadGrid"); //重新载入
        }
        else
            bootbox.alert({ size: 'small', message: data.Msg });
    }
</script>